// if (process.env.NODE_ENV === 'develoment') {
    //     axios.defaults.baseURL = 'http://localhost:3000';
    //   } else {
    //     axios.defaults.baseURL = '/service';
    //   } 
    axios.defaults.baseURL = 'http://10.8.20.137:8060';
    // axios.defaults.baseURL = 'http://localhost:3000';
    const myhttp = axios.create({
      headers: {
        'x-requested-with': 'XMLHttpRequest',
      },
    });
    
    
    myhttp.interceptors.response.use((response) => {
      if (!response.data.success && response.data.code === 'FAILURE') {
        return Promise.reject(response);
      } else if (!response.data.success && response.data.code === 'UNAUTHORIZED') {
        history.replace('/401');
        return Promise.reject(response);
      }
      return response.data;
    }, (error) => {
      location.href='http://10.8.20.137:8060/demo/error.html'
      return Promise.reject(error);
    });